using UnityEngine;

public class C_打坐点 : MonoBehaviour
{
	public Transform _Tsf_UI;

	private ItemUI_打坐点 _ItemUI_打坐点;

	private void Start()
	{
		_ItemUI_打坐点 = MonoSingleton<GameManager>.Instance.F_Get_ItemUI_打坐点();
		_ItemUI_打坐点._可见性 = false;
		_ItemUI_打坐点.F_SetPos(_Tsf_UI.position);
		_ItemUI_打坐点._Pos = base.transform.position;
	}

	private void OnDestroy()
	{
		if (_ItemUI_打坐点 != null)
		{
			Object.Destroy(_ItemUI_打坐点.gameObject);
		}
	}

	private void OnTriggerEnter2D(Collider2D collision)
	{
		if (collision.tag == "Player")
		{
			_ItemUI_打坐点.F_SetPos(_Tsf_UI.position);
			_ItemUI_打坐点._可见性 = true;
		}
	}

	private void OnTriggerStay2D(Collider2D collision)
	{
		if (collision.tag == "Player")
		{
			_ItemUI_打坐点.F_SetPos(_Tsf_UI.position);
		}
	}

	private void OnTriggerExit2D(Collider2D collision)
	{
		if (collision.tag == "Player")
		{
			_ItemUI_打坐点._可见性 = false;
		}
	}
}
